package com.huawei.appgallery.wishwall.ui.cardkit.card;

import android.content.Context;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;
import com.huawei.appgallery.foundation.card.base.card.BaseDistCard;
import com.huawei.appgallery.foundation.ui.framework.cardkit.bean.CardBean;
import com.huawei.appgallery.foundation.ui.framework.widget.button.DownloadButton;
import com.huawei.appgallery.wishwall.ui.cardkit.bean.WishWallSearchCardBean;
import huawei.widget.HwTextView;
import o.cgz;
import o.ddq.d;
import o.ddq.f;
import o.ddq.g;

public class WishWallSearchCard extends BaseDistCard {
    private HwTextView ʻ;
    private View ʼ;
    private HwTextView ʽ;
    private HwTextView ˋ;

    public WishWallSearchCard(Context context) {
        super(context);
    }

    public cgz ˏ(View view) {
        ˏ((ImageView) view.findViewById(d.ʻॱ));
        ॱ((TextView) view.findViewById(d.ˊˋ));
        ˋ((DownloadButton) view.findViewById(d.ॱˎ));
        this.ˋ = (HwTextView) view.findViewById(d.ॱᐝ);
        this.ʻ = (HwTextView) view.findViewById(d.ʽॱ);
        this.ʽ = (HwTextView) view.findViewById(d.ˎˎ);
        this.ʼ = view.findViewById(d.ॱˊ);
        ʽ(view);
        return this;
    }

    public void ˏ(CardBean cardBean) {
        super.ˏ(cardBean);
        if (ˊᐝ()) {
            this.ʼ.setVisibility(0);
        } else {
            this.ʼ.setVisibility(4);
        }
        if (cardBean instanceof WishWallSearchCardBean) {
            WishWallSearchCardBean wishWallSearchCardBean = (WishWallSearchCardBean) cardBean;
            this.ˋ.setText(this.ʼॱ.getResources().getQuantityString(g.ˎ, wishWallSearchCardBean.ॱ(), new Object[]{Integer.valueOf(wishWallSearchCardBean.ॱ())}));
            this.ʻ.setText(wishWallSearchCardBean.ˎˏ());
            this.ʽ.setText(this.ʼॱ.getString(f.ʽॱ, new Object[]{wishWallSearchCardBean.ˊ()}));
        }
    }
}
